<style rel="stylesheet/scss" lang="scss" scoped>
    .el-merchant-box {
        width: 100%;
        height: 825px;
        padding: 20px;
		overflow: auto;
        box-sizing: border-box;
        .box-flex {
            display: flex;
            margin-bottom: 10px;
        }
        .w-span {
            min-width: 160px;
            line-height: 40px;
            display: inline-block;
        }
		.l-radio{
			line-height: 40px;;
		}
		.pri-btn{
			margin: 0 auto;
		}
    }
</style>
<template>
    <div class="el-merchant-box">
        <el-row class=" box-flex">
            <el-col :span="12" class="box-flex m-l-10">
                <span class="w-span">公众号APPID</span>
                <el-input placeholder="请输入内容" clearable v-model="info.pubAppId"></el-input>
            </el-col>
        </el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">公众号APPsecret</span>
				<el-input placeholder="请输入内容" clearable v-model="info.pubAppSecret"></el-input>
			</el-col>
		</el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">小程序APPID</span>
				<el-input placeholder="请输入内容" clearable v-model="info.appId"></el-input>
			</el-col>
		</el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">小程序APPsecret</span>
				<el-input placeholder="请输入内容" clearable v-model="info.secret"></el-input>
			</el-col>
		</el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">微信商户平台号</span>
				<el-input placeholder="请输入内容" clearable v-model="info.wechatMerchantCode"></el-input>
			</el-col>
		</el-row>
		
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">商户平台APlkey</span>
				<el-input placeholder="请输入内容" clearable v-model="info.apiKey"></el-input>
			</el-col>
		</el-row>
		<el-row class="box-flex">
			<!--<el-button type="primary" class="pri-btn" @click="subWxInfo">保存</el-button>-->
		</el-row>
    </div>
</template>
<script>
	export default {
		props: {
			merchantInfo: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {
				info: {
					pubAppId: '',
					pubAppSecret: '',
					appId: '',
					secret: '',
					wechatMerchantCode: '',
					apiKey: '',
				}
			}
		},
		created() {
			if(this.merchantInfo && this.merchantInfo.merchantCode) {
				this.info.pubAppId = this.merchantInfo.pubAppId
				this.info.pubAppSecret = this.merchantInfo.pubAppSecret
				this.info.appId = this.merchantInfo.appId
				this.info.secret = this.merchantInfo.secret
				this.info.wechatMerchantCode = this.merchantInfo.wechatMerchantCode
				this.info.apiKey = this.merchantInfo.apiKey
				
			}
		},
		methods: {
			subWxInfo(){
				this.$emit('subWxInfo', this.info)
			}
		}
	}
</script>
